Kanzi  3.9.9
Kanzi Engine C++ API
kanzi::BindingHostConceptImpl< TDerivedClass > Class Template Reference

Implementation class for BindingHostConcept. More...

#include <kanzi/core.ui/binding/binding_host_concept_impl.hpp>

Inheritance diagram for kanzi::BindingHostConceptImpl< TDerivedClass >:
[legend]

Public Member Functions

void addBindingRuntime (AbstractBindingRuntimeSharedPtr entry, shared_ptr< void > owner)
 Adds an already-created binding runtime to this binding host. More...
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, shared_ptr< TDerivedClass > templateRoot, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Wrapper for setting a binding. More...
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, shared_ptr< TDerivedClass > templateRoot, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a binding. More...
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, shared_ptr< TDerivedClass > templateRoot, AbstractPropertyType propertyType, PropertyValuePrecedence precedence)
 Wrapper for setting a binding. More...
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Wrapper for setting a binding. More...
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a binding. More...
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyValuePrecedence precedence)
 Wrapper for setting a binding. More...
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType)
 Wrapper for setting a binding. More...
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding, shared_ptr< TDerivedClass > templateRoot)
 Sets a binding with no target. More...
 
BindingRuntimeHandle setBinding (AbstractBindingSharedPtr binding)
 Wrapper for setting a binding with no target. More...
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, shared_ptr< TDerivedClass > templateRoot, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Sets a binding to a certain property. More...
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType, PropertyField field, PropertyValuePrecedence precedence)
 Wrapper for setting a binding with owner. More...
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType)
 Wrapper for setting a binding with owner. More...
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, shared_ptr< TDerivedClass > templateRoot)
 Sets a binding with no target. More...
 
BindingRuntimeHandle setBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner)
 Wrapper for setting a binding with no target. More...
 
BindingRuntimeHandle setModifierBinding (AbstractBindingSharedPtr binding, shared_ptr< TDerivedClass > templateRoot, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a modifier binding. More...
 
BindingRuntimeHandle setModifierBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a modifier binding. More...
 
BindingRuntimeHandle setModifierBinding (AbstractBindingSharedPtr binding, AbstractPropertyType propertyType)
 Wrapper for setting a modifier binding. More...
 
BindingRuntimeHandle setModifierBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, shared_ptr< TDerivedClass > templateRoot, AbstractPropertyType propertyType, PropertyField field)
 Sets a modifier binding. More...
 
BindingRuntimeHandle setModifierBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType, PropertyField field)
 Wrapper for setting a modifier binding. More...
 
BindingRuntimeHandle setModifierBindingWithOwner (AbstractBindingSharedPtr binding, shared_ptr< void > owner, AbstractPropertyType propertyType)
 Wrapper for setting a modifier binding. More...
 
- Public Member Functions inherited from kanzi::BindingHostConcept
BindingRuntimeConstIterator beginBindingRuntimes () const
 Returns an iterator to the beginning of binding runtimes. More...
 
BindingRuntimeConstIterator endBindingRuntimes () const
 Returns an iterator to the end of binding runtimes. More...
 
AbstractBindingRuntimeSharedPtr getBindingRuntime (size_t idx)
 Gets binding by index. More...
 
size_t getBindingRuntimeCount () const
 Gets the number of binding runtimes added to this node. More...
 
void removeAllBindings ()
 Removes all binding runtimes. More...
 
void removeBinding (BindingRuntimeHandle &bindingRuntime)
 Removes a binding runtime added earlier. More...
 
void removeBindingsWithOwner (shared_ptr< void > owner)
 Removes all binding runtimes with the specified owner. More...
 

Protected Member Functions

TDerivedClass * getThisObject ()
 Internal accessor for the Curiously Recurring Template Pattern. More...
 
const TDerivedClass * getThisObject () const
 Internal accessor for the Curiously Recurring Template Pattern. More...
 
- Protected Member Functions inherited from kanzi::BindingHostConcept
void attachBindings ()
 Attach all bindings stored in this object. More...
 
void detachBindings ()
 Detach bindings. More...
 

Additional Inherited Members

- Public Types inherited from kanzi::BindingHostConcept
using BindingHostConceptSharedPtr = shared_ptr< BindingHostConcept >
 Binding host concept shared pointer type. More...
 
using BindingRuntimeConstIterator = BindingRuntimeContainer::const_iterator
 Const iterator for binding runtimes. More...
 
using BindingRuntimeContainer = vector< AbstractBindingRuntimeSharedPtr >
 Container for binding runtimes. More...
 
using BindingRuntimeIterator = BindingRuntimeContainer::iterator
 Iterator for binding runtimes. More...
 
- Protected Attributes inherited from kanzi::BindingHostConcept
BindingRuntimeContainer m_bindingRuntimes
 Bindings in this object. More...
 

Detailed Description

template<typename TDerivedClass>
class kanzi::BindingHostConceptImpl< TDerivedClass >

Implementation class for BindingHostConcept.

Specifies interface to set bindings to the properties while adding them to the binding host.

Classes using bindings must inherit this class while specializing with their class name.

Since
Kanzi 3.9.0

Member Function Documentation

template<typename TDerivedClass>
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBindingWithOwner ( AbstractBindingSharedPtr  binding,
shared_ptr< void >  owner,
shared_ptr< TDerivedClass >  templateRoot,
AbstractPropertyType  propertyType,
PropertyField  field,
PropertyValuePrecedence  precedence 
)
inline

Sets a binding to a certain property.

Using PropertyValuePrecedenceLocal erases earlier local value or binding to the property.

Parameters
bindingBinding to set.
ownerOwner shared pointer for the binding.
templateRootOverriding template root for the binding.
propertyTypeTarget property type.
fieldProperty field.
precedencePrecedence of the value source binding.
Returns
Binding runtime handler for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.
template<typename TDerivedClass>
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBindingWithOwner ( AbstractBindingSharedPtr  binding,
shared_ptr< void >  owner,
AbstractPropertyType  propertyType,
PropertyField  field,
PropertyValuePrecedence  precedence 
)
inline

Wrapper for setting a binding with owner.

Parameters
bindingBinding to set.
ownerOwner shared pointer for the binding.
propertyTypeTarget property type.
fieldProperty field.
precedencePrecedence of the value source binding.
Returns
Binding runtime handler for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.
template<typename TDerivedClass>
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBindingWithOwner ( AbstractBindingSharedPtr  binding,
shared_ptr< void >  owner,
AbstractPropertyType  propertyType 
)
inline

Wrapper for setting a binding with owner.

Parameters
bindingBinding to set.
ownerOwner shared pointer for the binding.
propertyTypeTarget property type.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.
template<typename TDerivedClass>
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBinding ( AbstractBindingSharedPtr  binding,
shared_ptr< TDerivedClass >  templateRoot,
AbstractPropertyType  propertyType,
PropertyField  field,
PropertyValuePrecedence  precedence 
)
inline

Wrapper for setting a binding.

Parameters
bindingBinding to set.
templateRootOverriding template root for the binding.
propertyTypeTarget property type.
fieldProperty field.
precedencePrecedence of the value source binding.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.
template<typename TDerivedClass>
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBinding ( AbstractBindingSharedPtr  binding,
shared_ptr< TDerivedClass >  templateRoot,
AbstractPropertyType  propertyType,
PropertyField  field 
)
inline

Wrapper for setting a binding.

Parameters
bindingBinding to set.
templateRootOverriding template root for the binding.
propertyTypeTarget property type.
fieldProperty field.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.
template<typename TDerivedClass>
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBinding ( AbstractBindingSharedPtr  binding,
shared_ptr< TDerivedClass >  templateRoot,
AbstractPropertyType  propertyType,
PropertyValuePrecedence  precedence 
)
inline

Wrapper for setting a binding.

Whole property is used.

Parameters
bindingBinding to set.
templateRootOverriding template root for the binding.
propertyTypeTarget property type.
precedencePrecedence of the value source binding.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.
template<typename TDerivedClass>
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBinding ( AbstractBindingSharedPtr  binding,
AbstractPropertyType  propertyType,
PropertyField  field,
PropertyValuePrecedence  precedence 
)
inline

Wrapper for setting a binding.

Parameters
bindingBinding to set.
propertyTypeTarget property type.
fieldProperty field.
precedencePrecedence of the value source binding.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.
template<typename TDerivedClass>
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBinding ( AbstractBindingSharedPtr  binding,
AbstractPropertyType  propertyType,
PropertyField  field 
)
inline

Wrapper for setting a binding.

Local precedence is used.

Parameters
bindingBinding to set.
propertyTypeTarget property type.
fieldProperty field.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.
template<typename TDerivedClass>
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBinding ( AbstractBindingSharedPtr  binding,
AbstractPropertyType  propertyType,
PropertyValuePrecedence  precedence 
)
inline

Wrapper for setting a binding.

Whole property is used.

Parameters
bindingBinding to set.
propertyTypeTarget property type.
precedencePrecedence of the value source binding.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.
template<typename TDerivedClass>
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBinding ( AbstractBindingSharedPtr  binding,
AbstractPropertyType  propertyType 
)
inline

Wrapper for setting a binding.

Whole property is used. Local precedence is used.

Parameters
bindingBinding to set.
propertyTypeTarget property type.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.
template<typename TDerivedClass>
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBindingWithOwner ( AbstractBindingSharedPtr  binding,
shared_ptr< void >  owner,
shared_ptr< TDerivedClass >  templateRoot 
)
inline

Sets a binding with no target.

The binding has no target. You can use the binding to execute binding processors.

Parameters
bindingBinding to set.
ownerOwner shared pointer for the binding.
templateRootOverriding template root for the binding.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.
template<typename TDerivedClass>
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBindingWithOwner ( AbstractBindingSharedPtr  binding,
shared_ptr< void >  owner 
)
inline

Wrapper for setting a binding with no target.

The binding has no target. You can use the binding to execute binding processors.

Parameters
bindingBinding to set.
ownerOwner shared pointer for the binding.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.
template<typename TDerivedClass>
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBinding ( AbstractBindingSharedPtr  binding,
shared_ptr< TDerivedClass >  templateRoot 
)
inline

Sets a binding with no target.

The binding has no target. You can use the binding to execute binding processors.

Parameters
bindingBinding to set.
templateRootOverriding template root for the binding.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.
template<typename TDerivedClass>
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setBinding ( AbstractBindingSharedPtr  binding)
inline

Wrapper for setting a binding with no target.

The binding has no target. You can use the binding to execute binding processors.

Parameters
bindingBinding to set.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.
template<typename TDerivedClass>
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setModifierBindingWithOwner ( AbstractBindingSharedPtr  binding,
shared_ptr< void >  owner,
shared_ptr< TDerivedClass >  templateRoot,
AbstractPropertyType  propertyType,
PropertyField  field 
)
inline

Sets a modifier binding.

As opposed to value source created by setBinding(), creates a property modifier binding.

Parameters
bindingBinding to set.
ownerOwner shared pointer for the binding.
templateRootOverriding template root for the binding.
propertyTypeTarget property type.
fieldProperty field.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.
template<typename TDerivedClass>
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setModifierBindingWithOwner ( AbstractBindingSharedPtr  binding,
shared_ptr< void >  owner,
AbstractPropertyType  propertyType,
PropertyField  field 
)
inline

Wrapper for setting a modifier binding.

As opposed to value source created by setBinding(), creates a property modifier binding.

Parameters
bindingBinding to set.
ownerOwner shared pointer for the binding.
propertyTypeTarget property type.
fieldProperty field.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.
template<typename TDerivedClass>
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setModifierBindingWithOwner ( AbstractBindingSharedPtr  binding,
shared_ptr< void >  owner,
AbstractPropertyType  propertyType 
)
inline

Wrapper for setting a modifier binding.

As opposed to value source created by setBinding(), creates a property modifier binding.

Parameters
bindingBinding to set.
ownerOwner shared pointer for the binding.
propertyTypeTarget property type.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.
template<typename TDerivedClass>
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setModifierBinding ( AbstractBindingSharedPtr  binding,
shared_ptr< TDerivedClass >  templateRoot,
AbstractPropertyType  propertyType,
PropertyField  field 
)
inline

Wrapper for setting a modifier binding.

As opposed to value source created by setBinding(), creates a property modifier binding.

Parameters
bindingBinding to set.
templateRootOverriding template root for the binding.
propertyTypeTarget property type.
fieldProperty field.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.
template<typename TDerivedClass>
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setModifierBinding ( AbstractBindingSharedPtr  binding,
AbstractPropertyType  propertyType,
PropertyField  field 
)
inline

Wrapper for setting a modifier binding.

As opposed to value source created by setBinding(), creates a property modifier binding.

Parameters
bindingBinding to set.
propertyTypeTarget property type.
fieldProperty field.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.
template<typename TDerivedClass>
BindingRuntimeHandle kanzi::BindingHostConceptImpl< TDerivedClass >::setModifierBinding ( AbstractBindingSharedPtr  binding,
AbstractPropertyType  propertyType 
)
inline

Wrapper for setting a modifier binding.

As opposed to value source created by setBinding(), creates a property modifier binding. Whole property is used.

Parameters
bindingBinding to set.
propertyTypeTarget property type.
Returns
Binding runtime handler created for the binding.
Since
Kanzi 3.9.7 changed AbstractBindingRuntimeSharedPtr to BindingRuntimeHandle.
template<typename TDerivedClass>
void kanzi::BindingHostConceptImpl< TDerivedClass >::addBindingRuntime ( AbstractBindingRuntimeSharedPtr  entry,
shared_ptr< void >  owner 
)
inline

Adds an already-created binding runtime to this binding host.

This is an internal function that is only exposed in the public interface for use in tests. Do not call this function. Use setBinding() or setModifierBinding() instead.

Parameters
entryBinding runtime to add.
ownerOwner shared pointer for the binding.
template<typename TDerivedClass>
TDerivedClass* kanzi::BindingHostConceptImpl< TDerivedClass >::getThisObject ( )
inlineprotected

Internal accessor for the Curiously Recurring Template Pattern.

Returns
Derived instance of this.
template<typename TDerivedClass>
const TDerivedClass* kanzi::BindingHostConceptImpl< TDerivedClass >::getThisObject ( ) const
inlineprotected

Internal accessor for the Curiously Recurring Template Pattern.

Returns
Const derived instance of this.

The documentation for this class was generated from the following file: